﻿using System;
using MoonSharp.Interpreter;
using UnityEngine;

namespace Lua
{
	// Token: 0x020002EB RID: 747
	[MoonSharpUserData]
	public class Bones
	{
		// Token: 0x06001183 RID: 4483 RVA: 0x0007FA0F File Offset: 0x0007DC0F
		[MoonSharpHidden]
		public Bones(Animator animator)
		{
			if (animator == null)
			{
				Debug.LogError("No animator to create body bones.");
			}
			this._animator = animator;
		}

		// Token: 0x1700027D RID: 637
		// (get) Token: 0x06001184 RID: 4484 RVA: 0x0007FA34 File Offset: 0x0007DC34
		public Transform head
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.Head);
			}
		}

		// Token: 0x1700027E RID: 638
		// (get) Token: 0x06001185 RID: 4485 RVA: 0x0007FA3E File Offset: 0x0007DC3E
		public Transform hips
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.Hips);
			}
		}

		// Token: 0x1700027F RID: 639
		// (get) Token: 0x06001186 RID: 4486 RVA: 0x0007FA47 File Offset: 0x0007DC47
		public Transform spine
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.Spine);
			}
		}

		// Token: 0x17000280 RID: 640
		// (get) Token: 0x06001187 RID: 4487 RVA: 0x0007FA50 File Offset: 0x0007DC50
		public Transform leftUpperArm
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.LeftUpperArm);
			}
		}

		// Token: 0x17000281 RID: 641
		// (get) Token: 0x06001188 RID: 4488 RVA: 0x0007FA5A File Offset: 0x0007DC5A
		public Transform leftLowerArm
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.LeftLowerArm);
			}
		}

		// Token: 0x17000282 RID: 642
		// (get) Token: 0x06001189 RID: 4489 RVA: 0x0007FA64 File Offset: 0x0007DC64
		public Transform leftHand
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.LeftHand);
			}
		}

		// Token: 0x17000283 RID: 643
		// (get) Token: 0x0600118A RID: 4490 RVA: 0x0007FA6E File Offset: 0x0007DC6E
		public Transform rightUpperArm
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.RightUpperArm);
			}
		}

		// Token: 0x17000284 RID: 644
		// (get) Token: 0x0600118B RID: 4491 RVA: 0x0007FA78 File Offset: 0x0007DC78
		public Transform rightLowerArm
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.RightLowerArm);
			}
		}

		// Token: 0x17000285 RID: 645
		// (get) Token: 0x0600118C RID: 4492 RVA: 0x0007FA82 File Offset: 0x0007DC82
		public Transform rightHand
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.RightHand);
			}
		}

		// Token: 0x17000286 RID: 646
		// (get) Token: 0x0600118D RID: 4493 RVA: 0x0007FA8C File Offset: 0x0007DC8C
		public Transform rightUpperLeg
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.RightUpperLeg);
			}
		}

		// Token: 0x17000287 RID: 647
		// (get) Token: 0x0600118E RID: 4494 RVA: 0x0007FA95 File Offset: 0x0007DC95
		public Transform rightLowerLeg
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.RightLowerLeg);
			}
		}

		// Token: 0x17000288 RID: 648
		// (get) Token: 0x0600118F RID: 4495 RVA: 0x0007FA9E File Offset: 0x0007DC9E
		public Transform rightFoot
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.RightFoot);
			}
		}

		// Token: 0x17000289 RID: 649
		// (get) Token: 0x06001190 RID: 4496 RVA: 0x0007FAA7 File Offset: 0x0007DCA7
		public Transform leftUpperLeg
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.LeftUpperLeg);
			}
		}

		// Token: 0x1700028A RID: 650
		// (get) Token: 0x06001191 RID: 4497 RVA: 0x0007FAB0 File Offset: 0x0007DCB0
		public Transform leftLowerLeg
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.LeftLowerLeg);
			}
		}

		// Token: 0x1700028B RID: 651
		// (get) Token: 0x06001192 RID: 4498 RVA: 0x0007FAB9 File Offset: 0x0007DCB9
		public Transform leftFoot
		{
			get
			{
				return this.GetBoneTransform(HumanBodyBones.LeftFoot);
			}
		}

		// Token: 0x06001193 RID: 4499 RVA: 0x0007FAC4 File Offset: 0x0007DCC4
		private Transform GetBoneTransform(HumanBodyBones humanBodyBone)
		{
			Transform boneTransform = this._animator.GetBoneTransform(humanBodyBone);
			if (boneTransform == null)
			{
				return null;
			}
			return new Transform(boneTransform);
		}

		// Token: 0x040016B6 RID: 5814
		private Animator _animator;
	}
}
